<template>
  <div class="knowledgeDetail">
    <div class="title">{{articleInfo.title}}</div>
    <div class="publishName">颁布单位：{{articleInfo.publish_unit}}</div>
    <div class="publishTime">颁布时间：{{articleInfo.publish_date}}</div>
    <div class="timeArea">
      <div class="time">发布时间：{{articleInfo.publish_date}}</div>
      <div class="time">最后修改时间：{{articleInfo.mtime}}</div>
    </div>
    <div class="knowledgeContent" v-html="articleInfo.content"></div>
  </div>
</template>

<script>
	export default {
		name: "SKnowledgeDetail",
		props: {},
		data() {
			return {
				article_id: '',
				articleInfo: {}
      };
		},
		computed: {},
		watch: {},
		components: {},
		methods: {
			getData(){
				this.$axios.post(this.$api.detailArticle, {
					article_id: this.article_id
				}).then(res => {
					let {code, msg, data} = res;
					this.loading = false;
					if (code == 200) {
						this.articleInfo = data;
					} else {
						this.$message.error(msg);
					}
				}).catch(ret => {
					this.$message.error(ret.msg || '服务繁忙，请稍后再试');
				});
      }
    },
		mounted() {
			this.article_id = this.$route.query.article_id;
			this.getData()
		},
		created() {
		}
	}
</script>

<style scoped lang="less" src="@/style/sorting/knowledge/knowledgeDetail/index.less">

</style>
